package Hxw3DEngine.core.materials
{
	import Hxw3DEngine.core.materials.shader.DiffuseShader;
	import Hxw3DEngine.core.Resource.geometry.ResourceGeometry;
	import Hxw3DEngine.core.Resource.texture.ResourceTexture;
	import Hxw3DEngine.core.materials.shader.Shader3D;
	import Hxw3DEngine.core.materials.shader.newFilter.SkyBoxFilter;
	
	import flash.display3D.Context3D;
	import flash.display3D.Context3DBlendFactor;
	import flash.display3D.Context3DCompareMode;
	import flash.geom.*;
	
	public class SkyboxMaterial extends Material3D
	{
		
		private var _texture:ResourceTexture;
		public function get texture():ResourceTexture
		{
			return _texture;
		}
		
		public function set texture(value:ResourceTexture):void
		{
			_texture = value;
		}
		
		public function SkyboxMaterial(_texture:ResourceTexture)
		{
			super();
			texture = _texture;
			shader = new Shader3D([]);
			shader.addFilter(new SkyBoxFilter(_texture));
		}
		
		override public function draw(geometry:ResourceGeometry,context:Context3D):void
		{
			super.draw(geometry,context);
		}
		
	}
}
